﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="common_widget.aspx.cs" Inherits="Template.Web.Admin.common_widget" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title></title>
    <!-- Bootstrap core CSS -->
    <link href="../css/bootstrap.min.css" rel="stylesheet" />
    <link href="../css/bootstrap-reset.css" rel="stylesheet" />
    <!--external css-->
    <link href="../assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
    <!-- Custom styles for this template -->
    <link href="../css/style.css" rel="stylesheet" />
    <link href="../css/style-responsive.css" rel="stylesheet" />
    <link href="../assets/toastr-master/toastr.css" rel="stylesheet" />
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->
    <!--[if lt IE 9]>
    <script src="../js/html5shiv.js"></script>
    <script src="../js/respond.min.js"></script><![endif]-->
</head>
<body>
    <section class="wrapper site-min-height">
        <!-- page start-->
        <div class="col-xs-12">
            <section class="panel panel-primary">
                <header class="panel-heading"><i class="fa fa-search"></i>常用按钮（点击按钮赋值代码）</header>
                <div class="panel-body">
                    <button class="btn btn-success btn-sm btnHtmlCopy" data-zclip-text="<button class=&quot;btn btn-success btn-sm&quot;><i class=&quot;fa fa-filter&quot;></i>搜索</button>"><i class="fa fa-filter"></i>搜索</button>
                    <button class="btn btn-default btn-sm btnHtmlCopy" data-zclip-text="<button class=&quot;btn btn-default btn-sm&quot;><i class=&quot;fa fa-undo&quot;></i>重置</button>"><i class="fa fa-undo"></i>重置</button>
                    <button class="btn btn-primary btn-sm btnHtmlCopy" data-zclip-text="<button class=&quot;btn btn-primary btn-sm&quot;><i class=&quot;fa fa-plus&quot;></i>新增</button>"><i class="fa fa-plus"></i>新增</button>
                    <button class="btn btn-info btn-sm btnHtmlCopy" data-zclip-text="<button class=&quot;btn btn-info btn-sm&quot;><i class=&quot;fa fa-pencil-square-o&quot;></i>编辑</button>"><i class="fa fa-pencil-square-o"></i>编辑</button>
                    <button class="btn btn-danger btn-sm btnHtmlCopy" data-zclip-text="<button class=&quot;btn btn-danger btn-sm&quot;><i class=&quot;fa fa-trash-o&quot;></i>删除</button>"><i class="fa fa-trash-o"></i>删除</button>
                    <button class="btn btn-success btn-sm btnHtmlCopy" data-zclip-text="<button class=&quot;btn btn-success btn-sm&quot;><i class=&quot;fa fa-search&quot;></i>查看</button>"><i class="fa fa-search"></i>查看</button>
                    <button class="btn btn-warning btn-sm btnHtmlCopy" data-zclip-text="<button class=&quot;btn btn-warning btn-sm&quot;><i class=&quot;fa fa-reply&quot;></i>返回</button>"><i class="fa fa-reply"></i>返回</button>
                    <button class="btn btn-warning btn-sm btnHtmlCopy" data-zclip-text="<button class=&quot;btn btn-warning btn-sm&quot;><i class=&quot;fa fa-refresh&quot;></i>刷新</button>"><i class="fa fa-refresh"></i>刷新</button>
                    <button class="btn btn-info btn-sm btnHtmlCopy" data-zclip-text="<button class=&quot;btn btn-info btn-sm&quot;><i class=&quot;fa fa-file-text-o&quot;></i>导入</button>"><i class="fa fa-file-text-o"></i>导入</button>
                </div>
            </section>
        </div>

        <div class="col-xs-12" id="simplePanel">
            <section class="panel panel-primary">  
                <header class="panel-heading">
                    <i class="fa fa-search"></i>一个面板
                    <button class="btn btn-primary btn-sm btnHtmlCopy" data-zclip-text="<div class=&quot;col-xs-12&quot; id=&quot;simplePanel&quot;><section class=&quot;panel panel-primary&quot;><header class=&quot;panel-heading&quot;><i class=&quot;fa fa-search&quot;></i>一个面板</header><div class=&quot;panel-body&quot;></div></section></div>"><i class="fa fa-file-text-o"></i>复制代码</button>
                </header>
                <div class="panel-body">

                </div>
            </section>
        </div>
        <!-- page end-->
    </section>

    <!-- js placed at the end of the document so the pages load faster -->
    <script src="/js/jquery.js"></script>
    <script src="/js/bootstrap.min.js"></script>
    <script src="/assets/toastr-master/toastr.js"></script>
    <script src="/scripts/zeroclipboard/scripts/jquery.zeroclipboard.min.js" type="text/javascript"></script>

    <script>
        $(document).ready(function () {
            // 复制Html操作
            $('.btnHtmlCopy').on('beforecopy', function (e) {
                console.log(e.type + " - #" + e.target.id);
            }).on('copy', function (e) {
                e.clipboardData.clearData();
                e.clipboardData.setData('text/plain', $(this).data('zclip-text'));
                e.preventDefault();
            });

        });


    </script>
</body>
</html>
